using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class MoveUI : MonoBehaviour
{
    public RectTransform UI;
    public float speed = 10f;

    // Start is called before the first frame update
    void Start()
    {
        UI = GetComponent<RectTransform>();
    }

    // Update is called once per frame
    void Update()
    {
        UI.localPosition = Vector3.MoveTowards(
            UI.localPosition,
            new Vector3(400f, 0, 0),
            speed * Time.deltaTime
        );
    }
}
